<template>
    <!--我的评价info-->
  <div class="evaluateinfo bg_colorff p_r30 p_l30">
    <div class="flex line90">
      <div class="titlename font_size28 color_33">商品名称： {{goods.goods_name}}</div>
      <div class="t_right flex-1"><img class="left_con" src="../../assets/img/icon/jiantou_left.png"/></div>
    </div>
    <div class="font_size24 color_33 m_b20">￥98.00</div>
    <div class="orderinfo p_b30">
      <div class="color_99 font_size24"><span class="spanlable">订单号</span><span>{{goods.ordernum}}</span></div>
      <div class="color_99 font_size24"><span class="spanlable">下单时间</span><span>{{goods.timer}}</span></div>
      <div class="color_99 font_size24"><span class="spanlable">购买数量</span><span>X{{goods.goods_num}}</span></div>
      <div class="font_size24"><span class="spanlable color_99">商品总价</span><span class="color_fc">￥{{goods.allprice}}</span></div>
    </div>
    <div class="evaluate_text" style="display: none">
      <div class="font_size24 color_33">评价内容</div>
      <div class="p_t30 p_b30">这是一个不错的产品。。。</div>
      <textarea></textarea>
    </div>
    <div class="addevaluate">
      <textarea class="text_area font_size28 color_99" v-model="content" placeholder="请输入您的评价内容"></textarea>
      <div class="img_box t_center m_t20">
        <img class="up_img" src="../../assets/img/upphone.png" height="80" width="93"/>
        <div class="font_size24 color_99 m_t20">添加图片</div>
      </div>
      <div class="addbtn font_size32" @click="commitFn">提交</div>
    </div>
  </div>
</template>

<script>
    export default {
        name: "evaluateinfo",
      data(){
          return{
            goods: {},
            content: ''
          }
      },
      created(){
        this.goods = this.$route.query.info
      },
      methods: {
        commitFn(){
          if(!this.content){
            this.$toast('请输入评价内容')
            return
          }
          this.$util.post('order/postComment', {
            uid: this.$store.state.userinfo.uid,
            goods_id: this.goods.goods_id,
            order_sn: this.$store.state.userinfo.uid,
            content: this.content,
            images: ''
          }).then(data => {
            if(data.status == 1){
              this.$toast('评论成功')
            }
          })
        }
      }
    }

</script>

<style lang="less" scoped>
  @import "../../assets/css/public";
  @import "../../assets/css/evaluate/evaluate";
</style>
